<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			pre{
				font-size: 20px;
			}
		</style>
	</head>
	<body>
<pre>
	
</pre>
		<div id="box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<script>
			
			/**
			 * arguments
			 * 函数所有参数的集合
			 * */
			function sum(){
				//console.log("arguments:",arguments);
				//....
				var s=0;
				for(var a=0;a<arguments.length;a++){
					s+=arguments[a];
				}
				console.log("s:",s);
			}
			
			sum();//0
			sum(1,2,3);//6
			sum(2,4,6);//12
			fgx();
			
			var divs=document.querySelectorAll("#box>div");
			console.log("divs:",divs);
			//伪数组===>数组(可以使用数组中的任意方法)
			var divsArr1=Array.prototype.slice.call(divs);
			console.log("divsArr1:",divsArr1);
			var divsArr2=Array.prototype.slice.apply(divs);
			console.log("divsArr2:",divsArr2);
			var divsArr3=Array.prototype.slice.bind(divs)();
			console.log("divsArr3:",divsArr3);
			fgx();
			var divsArr4=[].slice.call(divs);
			console.log("divsArr4:",divsArr4);
			var divsArr5=[].slice.apply(divs);
			console.log("divsArr5:",divsArr5);
			var divsArr6=[].slice.bind(divs)();
			console.log("divsArr6:",divsArr6);
			
			
			
			
			function fgx(str=""){
				console.log(str+"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
			}
		</script>
	</body>
</html>
